package com.dianmi.seckill.common.advice;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xieqiaofu
 * @date 2020/12/4
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseCode {

    public static ResponseCode SUCCESS = new ResponseCode(200, "成功");
    public static ResponseCode SERVICE_ERROR = new ResponseCode(500, "系统异常");

    //业务异常code 系统标识两位 + 业务类型两位 + 具体编码四位
    public static ResponseCode QUANTITY_OVERFLOW = new ResponseCode(80010001, "提交任务数量错误");

    public static ResponseCode BIGDATA_CODE_ERROR = new ResponseCode(80020001, "大数据接口type类型匹配不上");

    public static ResponseCode DUPLICATE_KEY = new ResponseCode(80030001, "唯一键冲突");

    //非超管，没权限查看
    public static ResponseCode NOT_SUPER_ADMIN = new ResponseCode(80040001, "不是超管，没有权限查看");

    private int code;

    private String msg;
}
